<?php
namespace app\web\api;
use app\src\user\enum\RegFromEnum;
use app\src\user\enum\RoleEnum;
use app\web\helper\WebApiHelper;

/**
 * Created by PhpStorm.
 * User: Gooraye
 * Date: 2017-06-03
 * Time: 13:53
 */
class InsuranceApi
{

    /**
     * 注册接口
     * @param $nickname
     * @param $username
     * @param $password
     * @param $email
     * @param $country
     * @param string $code
     * @return array
     */
    public static function addApply($uid,$insurance_id,$name,$car_code,$mobile,$id_front,$id_back,$driving_license_front,$driving_license_back,$annual_survey,$three_respons_insurance,$his_insurance)
    {
        $data = [
            'api_ver' => '100',
            'uid' => $uid,
            'insurance_id' => $insurance_id,
            'name' => $name,
            'car_code' => $car_code,
            'mobile' => $mobile,
            'id_front' => $id_front,
            'id_back' => $id_back,
            'driving_license_front' => $driving_license_front,
            'driving_license_back' => $driving_license_back,
            'annual_survey' => $annual_survey,
            'three_respons_insurance' => $three_respons_insurance,
            'his_insurance' => $his_insurance
        ];
        return WebApiHelper::callRemote('By_Insurance_addApply', $data);
    }


    public static function userApplys($uid)
    {
        $data = [
            'api_ver' => '100',
            'uid' => $uid
        ];
        return WebApiHelper::callRemote('By_Insurance_userApplys', $data);
    }


    public static function addPayImg($id,$img)
    {
        $data = [
            'api_ver' => '100',
            'id' => $id,
            'img' => $img
        ];
        return WebApiHelper::callRemote('By_Insurance_addPayImg', $data);
    }
}